package com.purengage.ipilih;

import java.util.ArrayList;

import com.markupartist.android.widget.ActionBar;
import com.markupartist.android.widget.ActionBar.Action;
import com.markupartist.android.widget.ActionBar.IntentAction;
import com.purengage.ipilih.lib.EntryAdapterDetailRelawan;
import com.purengage.ipilih.lib.EntryItem;
import com.purengage.ipilih.lib.Item;
import com.purengage.ipilih.lib.SectionItem;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ListView;

public class DetailRelawan extends Activity {
	ArrayList<Item> items = new ArrayList<Item>();
	ListView listview = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_detail_relawan);

		final ActionBar actionBar = (ActionBar) findViewById(R.id.actionbar);
		actionBar.setTitle("Relawan");
		actionBar.setHomeAction(new IntentAction(this, Relawan
				.createIntent(this), R.drawable.ic_action_back));

		final Action Edit = new IntentAction(this, new Intent(this,
				EditDetailRelawan.class), R.drawable.edit);
		actionBar.addAction(Edit);

		final Action Delete = new IntentAction(this, new Intent(this,
				Main.class), R.drawable.delete);
		actionBar.addAction(Delete);
		
		listview = (ListView) findViewById(R.id.list_detail_relawan);
		items.add(new SectionItem("Area Kerja"));
		items.add(new EntryItem(0, "Propinsi", "Jawa Timur", null, null));
		items.add(new EntryItem(0, "Kabupaten", "Bojonegoro", null, null));
		items.add(new EntryItem(0, "Kecamatan", "Balen", null, null));
		items.add(new EntryItem(0, "Desa", "Semua", null, null));
		items.add(new SectionItem("Akses"));
		items.add(new EntryItem(0, "ID Login", "Khusus Koordinator", null, null));
		items.add(new EntryItem(0, "PIN", "Khusus Koordinator", null, null));
		items.add(new EntryItem(0, "Status", "Aktif", null, null));
		items.add(new SectionItem("Target"));
		items.add(new EntryItem(0, "Pencapaian Target", "Khusus Koordinator", null, null));
		EntryAdapterDetailRelawan adapter = new EntryAdapterDetailRelawan(this, items);
		listview.setAdapter(adapter);
		//listview.setOnItemClickListener(this);
	}

}
